<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="../../stylesheets/lyjNav.css">
    <link rel="stylesheet" href="../../stylesheets/reset.css">
    <link rel="stylesheet" href="../../stylesheets/person-center/six-index.css">
    <link rel="stylesheet" href="../../stylesheets/person-center/add address.css">
    <link rel="stylesheet" href="http://at.alicdn.com/t/font_1512981_b3gt4rwbf0t.css">
    <title>add address</title>
    <style>
    </style>
</head>

<body>
    <!-- 头部 -->
    <div id="lxcbox">
        <div id="lxcheader"></div>
        <div id="lxcsearch"></div>
    </div>
    <div class="navwrap clear">
        <div id="nav"></div>
        <div class="tradecate"></div>
    </div>

    <div class="clear" id="six-zhu">
        <iframe src="/lwb/left" frameborder="0" id="six-if2" scrolling="no"></iframe>
        <div id="six-right">
            <div id="six-right-1">
                <span class="six-tianjia">添加新地址</span>
            </div>
            <div id="six-right-2">
                <div class="six-tianxie">
                    <div class="six-write">
                        <span class="six-xing">*</span><span class="six-ren">收货人姓名：</span>
                        <input type="text" name="" id="six-mingzi" value="">
                    </div>
                    <div class="six-write1">
                        <span class="six-xing">*</span><span class="six-diqu">所在地区：</span>
                        <select name="省" id="six-xuanze1">
                            <option value="北京市">北京市</option>
                        </select>
                        <select name="市" id="six-xuanze2">
                            <option value="北京市">北京市</option>
                        </select>
                        <select name="县/区" id="six-xuanze3">
                            <option value="海淀区">海淀区</option>
                        </select>
                    </div>
                    <div class="six-write2">
                        <span class="six-xing">*</span><span class="six-zhuzhi">详细地址：</span>
                        <input type="text" name="" id="six-dizhi" value="">
                    </div>
                    <div class="six-write3">
                        <span class="six-xing">*</span><span class="six-tel">联系电话：</span>
                        <input id="six-phone" type="text" onkeyup="value=value.replace(/[^\d\-\d]/g,'')"
                            maxlength=11 value=""></input>
                        <!-- <span>或固定电话：</span>
                        <input id="six-tel1" type="text" onkeyup="value=value.replace(/[^\d\-\d]/g,'')"
                            maxlength=3></input>
                        <span>-</span>
                        <input id="six-tel2" type="text" onkeyup="value=value.replace(/[^\d\-\d]/g,'')"
                            maxlength=8></input> -->
                    </div>
                    <div class="six-write4">
                        <input type="radio" name="设置为常用地址" id="six-changyong">
                        <span class="six-shezhi">设置为常用地址</span>
                    </div>
                    <div class="six-write5">
                        <span class="six-save">保存</span>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- 尾部 -->
    <div id="lxcfooter">
        <div id="lxcfooter1"></div>
        <div id="lxcfooter2"></div>
        <div id="lxcbottom"></div>
    </div>
</body>
<script src="../../javascripts/jquery-3.4.1.min.js"></script>
<script src="../../javascripts/lxcheader.js"></script>
<script src="../../javascripts/lyjNav.js"></script>
<script>
    $('.six-save').click(function (){
        location.href = '/lwb/administration'
    })
    $('.six-save').click(function(){
        $.ajax({
            url: "http://localhost:8080/lwb/liuge",
            type: 'post',
            data: {
                id: localStorage.getItem('userID'),
                userName: $('#six-mingzi').val(),
                address: $('#six-dizhi').val(),
                tel: $('#six-phone').val(),
            },
            dataType: 'json',
            success: (data) => {
                console.log(data);
            },
        })
    })
</script>
</html>